<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
    <style>
        .upload-list {
            display: inline-block;
            width: 60px;
            height: 60px;
            text-align: center;
            line-height: 60px;
            border: 1px solid transparent;
            border-radius: 4px;
            overflow: hidden;
            background: #fff;
            position: relative;
            box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
            margin-right: 4px;
        }

        .upload-list img {
            width: 100%;
            height: 100%;
        }

        .upload-list-cover {
            display: none;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0, 0, 0, .6);
        }

        .upload-list:hover .upload-list-cover {
            display: block;
        }

        .upload-list-cover i {
            color: #fff;
            font-size: 20px;
            cursor: pointer;
            margin: 0 2px;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("standings:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("standings:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("standings:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>

        <Tabs value="name1">
            <Tab-Pane label="通用信息" name="name1">
                <i-form ref="formValidate" :model="standings" :rules="ruleValidate" :label-width="80">
                    <Form-item label="类型" prop="typeId">
                        <i-input v-model="standings.typeName" @on-click="categoryTree" icon="eye" readonly="readonly"
                                 placeholder="类型"/>
                    </Form-item>
                    <Form-item label="标题" prop="title">
                        <i-input v-model="standings.title" placeholder="标题"/>
                    </Form-item>
                    <Form-item label="主持时间" prop="emceeTime">
                        <Date-picker format="yyyy-MM-dd HH:mm:ss" v-model="standings.emceeTime" placeholder="主持时间"/>
                    </Form-item>

                    <Row>
                        <i-col span="16">
                            <Form-item label="主图" prop="thumbnailUrl">
                                <i-input v-model="standings.thumbnailUrl" placeholder="主图" readonly/>
                            </Form-item>
                        </i-col>
                        <i-col span="3">
                            <Form-item :label-width="1">
                                <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
                                        max-size="2048"
                                        :on-success="handleSuccessPicUrl" :on-format-error="handleFormatError"
                                        :show-upload-list="false"
                                        :on-exceeded-size="handleMaxSize">
                                    <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                                </Upload>
                            </Form-item>
                        </i-col>
                        <i-col span="3">
                            <Form-item :label-width="1">
                                <i-button icon="eye" @click="eyeImagePicUrl">预览</i-button>
                            </Form-item>
                        </i-col>
                    </Row>

                    <Row>
                        <i-col span="16">
                            <Form-item label="现场" prop="url">
                                <i-input v-model="standings.url" placeholder="现场" readonly/>
                            </Form-item>
                        </i-col>
                        <i-col span="3">
                            <Form-item :label-width="1">
                                <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
                                        max-size="2048"
                                        :on-success="handleSuccessPicUrla" :on-format-error="handleFormatError"
                                        :show-upload-list="false"
                                        :on-exceeded-size="handleMaxSize">
                                    <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                                </Upload>
                            </Form-item>
                        </i-col>
                        <i-col span="3">
                            <Form-item :label-width="1">
                                <i-button icon="eye" @click="eyeImagePicUrla">预览</i-button>
                            </Form-item>
                        </i-col>
                    </Row>
                    <Form-item label="是否展示" prop="isShow">
                        <Radio-group v-model="standings.isShow">
                            <Radio label="1">
                                <span>是</span>
                            </Radio>
                            <Radio label="0">
                                <span>否</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>

                    <Form-item label="说明" prop="explain">
                        <i-input v-model="standings.explain" placeholder="说明"/>
                    </Form-item>
                    <Form-item>
                        <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                        <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                        返回</i-button>
                        <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置
                        </i-button>
                    </Form-item>
                </i-form>
            </Tab-Pane>
            <Tab-Pane label="详细描述" name="name2">
                <!--<template>-->
                    <!--<div class="upload-list" v-for="item in uploadList">-->
                        <!--<template v-if="item.status === 'finished'">-->
                            <!--<img :src="item.imgUrl"/>-->
                            <!--<div class="upload-list-cover">-->
                                <!--<Icon type="ios-eye-outline" @click.native="handleView(item.imgUrl)"></Icon>-->
                                <!--<Icon type="ios-trash-outline" @click.native="handleRemove(item)"></Icon>-->
                            <!--</div>-->
                        <!--</template>-->
                        <!--<template v-else>-->
                            <!--<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>-->
                        <!--</template>-->
                    <!--</div>-->
                    <!--<Upload-->
                            <!--ref="upload"-->
                            <!--:show-upload-list="false"-->
                            <!--:default-file-list="uploadList"-->
                            <!--:on-success="handleSuccess"-->
                            <!--:format="['jpg','jpeg','png']"-->
                            <!--:max-size="2048"-->
                            <!--:on-format-error="handleFormatError"-->
                            <!--:on-exceeded-size="handleMaxSize"-->
                            <!--:before-upload="handleBeforeUpload"-->
                            <!--multiple-->
                            <!--type="drag"-->
                            <!--action="../sys/oss/upload"-->
                            <!--style="display: inline-block;width:58px;">-->
                        <!--<div style="width: 58px;height:58px;line-height: 58px;">-->
                            <!--<Icon type="camera" size="20"></Icon>-->
                        <!--</div>-->
                    <!--</Upload>-->
                    <!--<Modal title="查看图片" v-model="visible">-->
                        <!--<img :src="imgName" v-if="visible" style="width: 100%"/>-->
                    <!--</Modal>-->
                <!--</template>-->
                <div id="desc"></div>
            </Tab-Pane>
        </Tabs>
    </Card>
</div>

<!-- 选择类型 -->
<div id="categoryLayer" style="display: none;padding:10px;">
    <ul id="categoryTree" class="ztree"></ul>
</div>

<script src="${rc.contextPath}/js/emcee/standings.js?_${date.systemTime}"></script>
</body>
</html>